package com.quasar.hpatient.module.comm_compile_step1;

import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;

import lib.quasar.base.frame.BasePresenter;


/**
 * description: 个人信息
 * created by kalu on 2018/4/9 14:57
 */
public class CompileStep1Presenter implements BasePresenter {

    void addTextWatcher(CompileStep1View view, EditText edit, int position) {

        if (null == view || null == edit) return;

        edit.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
            }

            @Override
            public void onTextChanged(CharSequence s, int start, int before, int count) {
            }

            @Override
            public void afterTextChanged(Editable s) {
                final String trim = s.toString().trim();
                view.updataMesssage(position, trim);
            }
        });
    }

    @Override
    public void recycler() {
    }
}
